package com.ilearn.actor;

/**
 * @Project: cmcchq
 * @Description:
 * @Version 1.0
 * @Throws :
 * @Author: <li>2019/7/2 lyndon Create 1.0
 * @Copyright (c)2019-2019 版权所有
 * @Modified By:
 */
public class ReceiverActer extends AbstractActor {

    @Override
    public void preStart() throws Exception {
        System.out.println(Thread.currentThread().getName() + "ReceiverActer: preStart()");
    }

    @Override
    public void receive(Object msg) throws Exception {
        System.out.println(Thread.currentThread().getName() + "ReceiverActer: receive()" + msg);
    }

    @Override
    public void postStop() throws Exception {
        System.out.println(Thread.currentThread().getName() + "ReceiverActer: postStop()");
    }

    @Override
    public void setContext(ActorContext context) {
        System.out.println(Thread.currentThread().getName() + "ReceiverActer: setContext(context)");
        super.setContext(context);
    }

    @Override
    public ActorContext context() {
        System.out.println(Thread.currentThread().getName() + "ReceiverActer: context()");
        return super.context();
    }
}
